.class public Lcom/estrongs/android/ftp/b;
.super Ljava/lang/Thread;
.source "ESFtpSession.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ftp/b$b;,
        Lcom/estrongs/android/ftp/b$a;
    }
.end annotation


# instance fields
.field private a:Ljava/net/Socket;

.field private b:Lcom/estrongs/android/ftp/a;

.field private c:Ljava/io/BufferedOutputStream;

.field private d:Ljava/io/BufferedReader;

.field private e:Z

.field private f:Ljava/lang/String;

.field private g:Ljava/lang/String;

.field private h:Ljava/lang/String;

.field private i:Ljava/lang/Integer;

.field private j:Lcom/estrongs/android/ftp/b$a;

.field private k:Lcom/estrongs/android/ftp/b$a;

.field private l:J

.field m:Z

.field private n:Ljava/io/File;

.field private o:Z

.field private p:Ljava/lang/String;

.field private q:Z


# direct methods
.method public constructor <init>(Ljava/net/Socket;Lcom/estrongs/android/ftp/a;)V
    .locals 4

    .line 1
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    .line 3
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    const/4 v1, 0x0

    .line 4
    iput-boolean v1, p0, Lcom/estrongs/android/ftp/b;->e:Z

    .line 5
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->f:Ljava/lang/String;

    .line 6
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->g:Ljava/lang/String;

    .line 7
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    .line 8
    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    iput-object v2, p0, Lcom/estrongs/android/ftp/b;->i:Ljava/lang/Integer;

    .line 9
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->j:Lcom/estrongs/android/ftp/b$a;

    .line 10
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    const-wide/16 v2, 0x0

    .line 11
    iput-wide v2, p0, Lcom/estrongs/android/ftp/b;->l:J

    .line 12
    iput-boolean v1, p0, Lcom/estrongs/android/ftp/b;->m:Z

    .line 13
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->n:Ljava/io/File;

    .line 14
    iput-boolean v1, p0, Lcom/estrongs/android/ftp/b;->o:Z

    const-string v0, "UTF-8"

    .line 15
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    const/4 v0, 0x1

    .line 16
    iput-boolean v0, p0, Lcom/estrongs/android/ftp/b;->q:Z

    .line 17
    iput-object p1, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    .line 18
    iput-object p2, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    const-string p1, "/"

    .line 19
    iput-object p1, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;Lcom/estrongs/android/ftp/b$a;)Lcom/estrongs/android/ftp/b$a;
    .locals 0

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/ftp/b;->j:Lcom/estrongs/android/ftp/b$a;

    return-object p1
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;)Ljava/lang/Integer;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ftp/b;->i:Ljava/lang/Integer;

    return-object p0
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;Ljava/lang/Integer;)Ljava/lang/Integer;
    .locals 0

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/ftp/b;->i:Ljava/lang/Integer;

    return-object p1
.end method

.method private a(ILjava/lang/String;)Ljava/lang/Object;
    .locals 5

    const/4 v0, 0x4

    const/4 v1, 0x3

    const/4 v2, 0x2

    const/4 v3, 0x0

    const/4 v4, 0x1

    if-eq p1, v4, :cond_3

    if-eq p1, v2, :cond_3

    if-eq p1, v1, :cond_3

    if-ne p1, v0, :cond_0

    goto :goto_1

    :cond_0
    const/4 v0, 0x5

    if-eq p1, v0, :cond_2

    const/4 v0, 0x6

    if-eq p1, v0, :cond_2

    const/4 v0, 0x7

    if-ne p1, v0, :cond_1

    goto :goto_0

    :cond_1
    return-object v3

    .line 60
    :cond_2
    :goto_0
    new-instance p1, Lcom/estrongs/android/ftp/b$b;

    invoke-direct {p1, p0}, Lcom/estrongs/android/ftp/b$b;-><init>(Lcom/estrongs/android/ftp/b;)V

    .line 61
    invoke-direct {p0, p2}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    iput-object p2, p1, Lcom/estrongs/android/ftp/b$b;->b:Ljava/lang/String;

    .line 62
    iget-wide v0, p0, Lcom/estrongs/android/ftp/b;->l:J

    iput-wide v0, p1, Lcom/estrongs/android/ftp/b$b;->a:J

    const-wide/16 v0, 0x0

    .line 63
    iput-wide v0, p0, Lcom/estrongs/android/ftp/b;->l:J

    return-object p1

    :cond_3
    :goto_1
    const-string p1, "/"

    if-eqz p2, :cond_f

    .line 64
    :try_start_0
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v4

    if-lez v4, :cond_f

    const-string v4, "-a "

    .line 65
    invoke-virtual {p2, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_8

    const-string v4, "-A "

    invoke-virtual {p2, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_8

    const-string v4, "-l "

    .line 66
    invoke-virtual {p2, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_8

    const-string v4, "-L "

    invoke-virtual {p2, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_4

    goto :goto_3

    :cond_4
    const-string v1, "-la "

    .line 67
    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_7

    const-string v1, "-LA "

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_7

    const-string v1, "-al "

    .line 68
    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_7

    const-string v1, "-AL "

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    goto :goto_2

    :cond_5
    const-string v0, "-a"

    .line 69
    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-A"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-la"

    .line 70
    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-LA"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-AL"

    .line 71
    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-al"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-L"

    .line 72
    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "-l"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_9

    :cond_6
    move-object p2, v3

    goto :goto_4

    .line 73
    :cond_7
    :goto_2
    invoke-virtual {p2, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p2

    goto :goto_4

    .line 74
    :cond_8
    :goto_3
    invoke-virtual {p2, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p2

    :cond_9
    :goto_4
    const-string v0, "."

    .line 75
    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_a

    move-object p2, v3

    goto :goto_6

    :cond_a
    const-string v0, ".."

    .line 76
    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_f

    .line 77
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_b

    return-object v3

    .line 78
    :cond_b
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {p2, p1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result p2

    const/16 v0, 0x2f

    if-eqz p2, :cond_c

    .line 79
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v1

    sub-int/2addr v1, v2

    invoke-virtual {p2, v0, v1}, Ljava/lang/String;->lastIndexOf(II)I

    move-result p2

    goto :goto_5

    .line 80
    :cond_c
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {p2, v0}, Ljava/lang/String;->lastIndexOf(I)I

    move-result p2

    :goto_5
    if-gez p2, :cond_d

    return-object v3

    :cond_d
    if-nez p2, :cond_e

    move-object p2, p1

    goto :goto_6

    .line 81
    :cond_e
    iget-object p1, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    const/4 v0, 0x0

    invoke-virtual {p1, v0, p2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_6

    :catch_0
    nop

    goto :goto_7

    :cond_f
    :goto_6
    move-object v3, p2

    :goto_7
    if-nez v3, :cond_10

    .line 82
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object p2, p2, Lcom/estrongs/android/ftp/a;->g:Ljava/lang/String;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 83
    :cond_10
    invoke-direct {p0, v3}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method private a(Lcom/estrongs/android/ftp/b$a;Ljava/io/File;Ljava/net/Socket;ZJ)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    if-eqz p4, :cond_0

    .line 32
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {v0}, Lcom/estrongs/android/ftp/a;->i()V

    goto :goto_0

    .line 33
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {v0}, Lcom/estrongs/android/ftp/a;->b()V

    :goto_0
    if-eqz p4, :cond_1

    .line 34
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/estrongs/fs/f;->h(Ljava/lang/String;)Ljava/io/OutputStream;

    move-result-object v0

    goto :goto_1

    :cond_1
    invoke-virtual {p3}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v0

    :goto_1
    if-eqz p4, :cond_2

    .line 35
    invoke-virtual {p3}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object p3

    goto :goto_2

    :cond_2
    new-instance p3, Ljava/io/FileInputStream;

    invoke-direct {p3, p2}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    :goto_2
    const-wide/16 v1, 0x0

    cmp-long v3, p5, v1

    if-lez v3, :cond_3

    if-nez p4, :cond_3

    .line 36
    invoke-virtual {p3, p5, p6}, Ljava/io/InputStream;->skip(J)J

    :cond_3
    const/16 p5, 0x2000

    new-array p6, p5, [B

    :goto_3
    const/4 v1, 0x0

    .line 37
    invoke-virtual {p3, p6, v1, p5}, Ljava/io/InputStream;->read([BII)I

    move-result v2

    const/4 v3, -0x1

    if-eq v2, v3, :cond_7

    iget-object v3, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-boolean v3, v3, Lcom/estrongs/android/ftp/a;->e:Z

    if-eqz v3, :cond_7

    .line 38
    iget-boolean v3, p1, Lcom/estrongs/android/ftp/b$a;->f:Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v3, :cond_5

    if-eqz p4, :cond_4

    .line 39
    iget-object p1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p1}, Lcom/estrongs/android/ftp/a;->h()V

    goto :goto_4

    .line 40
    :cond_4
    iget-object p1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p1}, Lcom/estrongs/android/ftp/a;->a()V

    :goto_4
    return-void

    .line 41
    :cond_5
    :try_start_1
    invoke-virtual {v0, p6, v1, v2}, Ljava/io/OutputStream;->write([BII)V

    if-eqz p4, :cond_6

    .line 42
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    int-to-long v2, v2

    invoke-virtual {v1, v2, v3}, Lcom/estrongs/android/ftp/a;->b(J)V

    goto :goto_3

    .line 43
    :cond_6
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    int-to-long v2, v2

    invoke-virtual {v1, v2, v3}, Lcom/estrongs/android/ftp/a;->a(J)V

    goto :goto_3

    .line 44
    :cond_7
    invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V

    if-eqz p4, :cond_8

    .line 45
    invoke-static {}, Les/p10;->e()Les/p10;

    move-result-object p1

    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p3

    invoke-virtual {p1, p3}, Les/p10;->a(Ljava/lang/String;)V

    .line 46
    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/fs/impl/local/f;->a(Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :cond_8
    if-eqz p4, :cond_9

    .line 47
    iget-object p1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p1}, Lcom/estrongs/android/ftp/a;->h()V

    goto :goto_5

    .line 48
    :cond_9
    iget-object p1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p1}, Lcom/estrongs/android/ftp/a;->a()V

    :goto_5
    return-void

    :catchall_0
    move-exception p1

    goto :goto_6

    :catch_0
    move-exception p1

    .line 49
    :try_start_2
    throw p1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :goto_6
    if-eqz p4, :cond_a

    .line 50
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p2}, Lcom/estrongs/android/ftp/a;->h()V

    goto :goto_7

    .line 51
    :cond_a
    iget-object p2, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {p2}, Lcom/estrongs/android/ftp/a;->a()V

    .line 52
    :goto_7
    goto :goto_9

    :goto_8
    throw p1

    :goto_9
    goto :goto_8
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;Lcom/estrongs/android/ftp/b$a;Ljava/io/File;Ljava/net/Socket;ZJ)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .line 6
    invoke-direct/range {p0 .. p6}, Lcom/estrongs/android/ftp/b;->a(Lcom/estrongs/android/ftp/b$a;Ljava/io/File;Ljava/net/Socket;ZJ)V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;Ljava/io/BufferedOutputStream;Ljava/lang/String;)V
    .locals 0

    .line 5
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/ftp/b;->a(Ljava/io/BufferedOutputStream;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ftp/b;Ljava/lang/String;)V
    .locals 0

    .line 4
    invoke-direct {p0, p1}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void
.end method

.method private declared-synchronized a(Ljava/io/BufferedOutputStream;Ljava/lang/String;)V
    .locals 1

    monitor-enter p0

    .line 53
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    invoke-virtual {p2, v0}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object p2
    :try_end_0
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    goto :goto_2

    .line 54
    :catch_0
    :try_start_1
    invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B

    move-result-object p2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 55
    :goto_0
    :try_start_2
    invoke-virtual {p1, p2}, Ljava/io/BufferedOutputStream;->write([B)V

    .line 56
    invoke-virtual {p1}, Ljava/io/BufferedOutputStream;->flush()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_1

    :catch_1
    move-exception p2

    .line 57
    :try_start_3
    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 58
    :try_start_4
    invoke-virtual {p1}, Ljava/io/BufferedOutputStream;->close()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    .line 59
    :catch_2
    :goto_1
    monitor-exit p0

    return-void

    :goto_2
    monitor-exit p0

    throw p1
.end method

.method private b(Ljava/lang/String;)Ljava/lang/String;
    .locals 3

    const-string v0, "/"

    .line 2
    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 3
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v1, v1, Lcom/estrongs/android/ftp/a;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 4
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 5
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v1, v1, Lcom/estrongs/android/ftp/a;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    .line 6
    :cond_1
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v2, v2, Lcom/estrongs/android/ftp/a;->g:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method static synthetic b(Lcom/estrongs/android/ftp/b;Ljava/lang/String;)Z
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method private c(Ljava/lang/String;)Ljava/lang/String;
    .locals 5

    const-string v0, "/.."

    .line 1
    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-gtz v0, :cond_0

    return-object p1

    :cond_0
    add-int/lit8 v1, v0, -0x1

    const-string v2, "/"

    .line 2
    invoke-virtual {p1, v2, v1}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;I)I

    move-result v1

    .line 3
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v3

    add-int/lit8 v3, v3, -0x3

    const/4 v4, 0x0

    if-ge v0, v3, :cond_1

    .line 4
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    add-int/lit8 v1, v1, 0x1

    invoke-virtual {p1, v4, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int/lit8 v0, v0, 0x3

    invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto :goto_0

    :cond_1
    add-int/lit8 v1, v1, 0x1

    .line 5
    invoke-virtual {p1, v4, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    :goto_0
    const-string v0, "//"

    .line 6
    invoke-virtual {p1, v0, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 7
    invoke-direct {p0, p1}, Lcom/estrongs/android/ftp/b;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

.method private d(Ljava/lang/String;)V
    .locals 16

    move-object/from16 v1, p0

    move-object/from16 v0, p1

    const-string v2, "550 Directory create failed.\r\n"

    const-string v3, "450 RMD fail.\r\n"

    const-string v4, "450 DELE fail.\r\n"

    const-string v5, "501 PORT invalid format.\r\n"

    .line 1
    sget-object v6, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "recv cmd:"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    const-string v6, " "

    .line 2
    invoke-virtual {v0, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v6

    if-eqz v6, :cond_53

    .line 3
    array-length v7, v6

    const/4 v8, 0x1

    if-ge v7, v8, :cond_0

    goto/16 :goto_24

    :cond_0
    const/4 v7, 0x0

    .line 4
    aget-object v9, v6, v7

    .line 5
    invoke-virtual {v9}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;

    move-result-object v9

    .line 6
    iget-boolean v10, v1, Lcom/estrongs/android/ftp/b;->m:Z

    const-string v11, "550 Target exist.\r\n"

    const-string v12, "503 Bad sequence of commands.\r\n"

    const/4 v13, 0x0

    const/4 v14, 0x5

    if-eqz v10, :cond_5

    const-string v2, "RNTO"

    .line 7
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    .line 8
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 9
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 10
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 11
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_3

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->n:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    goto :goto_1

    .line 12
    :cond_1
    :try_start_0
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v3

    iget-object v4, v1, Lcom/estrongs/android/ftp/b;->n:Ljava/io/File;

    invoke-virtual {v4}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v3

    invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v3, v2}, Lcom/estrongs/fs/f;->b(Lcom/estrongs/fs/g;Ljava/lang/String;)Z

    move-result v0
    :try_end_0
    .catch Lcom/estrongs/fs/FileSystemException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const/4 v0, 0x0

    :goto_0
    if-eqz v0, :cond_2

    const-string v0, "250 RNTO command successful.\r\n"

    .line 13
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_2

    :cond_2
    const-string v0, "550 RNTO failed.\r\n"

    .line 14
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_2

    .line 15
    :cond_3
    :goto_1
    invoke-direct {v1, v11}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_2

    .line 16
    :cond_4
    invoke-direct {v1, v12}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    .line 17
    :goto_2
    iput-boolean v7, v1, Lcom/estrongs/android/ftp/b;->m:Z

    .line 18
    iput-object v13, v1, Lcom/estrongs/android/ftp/b;->n:Ljava/io/File;

    return-void

    :cond_5
    const-string v10, "USER"

    .line 19
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    const-string v15, ""

    const/4 v7, 0x2

    if-eqz v10, :cond_8

    .line 20
    array-length v0, v6

    if-lt v0, v7, :cond_7

    aget-object v0, v6, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_6

    goto :goto_3

    .line 21
    :cond_6
    aget-object v0, v6, v8

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->f:Ljava/lang/String;

    goto :goto_4

    .line 22
    :cond_7
    :goto_3
    iput-object v15, v1, Lcom/estrongs/android/ftp/b;->f:Ljava/lang/String;

    :goto_4
    const-string v0, "331 User name okay, need password.\r\n"

    .line 23
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_8
    const-string v10, "PASS"

    .line 24
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    const-string v13, "530 Not logged in.\r\n"

    if-eqz v10, :cond_10

    .line 25
    array-length v0, v6

    if-lt v0, v7, :cond_a

    aget-object v0, v6, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_9

    goto :goto_5

    .line 26
    :cond_9
    aget-object v0, v6, v8

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->g:Ljava/lang/String;

    goto :goto_6

    .line 27
    :cond_a
    :goto_5
    iput-object v15, v1, Lcom/estrongs/android/ftp/b;->g:Ljava/lang/String;

    .line 28
    :goto_6
    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "anonymous:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-boolean v3, v3, Lcom/estrongs/android/ftp/a;->f:Z

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    const-string v3, ",user:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v3, v3, Lcom/estrongs/android/ftp/a;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, ",pass:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v3, v3, Lcom/estrongs/android/ftp/a;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, ",recv user:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->f:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "recv_pass:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->g:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 29
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-boolean v2, v0, Lcom/estrongs/android/ftp/a;->f:Z

    if-eqz v2, :cond_b

    .line 30
    iput-boolean v8, v1, Lcom/estrongs/android/ftp/b;->e:Z

    goto :goto_7

    .line 31
    :cond_b
    iget-object v0, v0, Lcom/estrongs/android/ftp/a;->a:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_c

    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->f:Ljava/lang/String;

    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v2, v2, Lcom/estrongs/android/ftp/a;->a:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_e

    :cond_c
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v0, v0, Lcom/estrongs/android/ftp/a;->b:Ljava/lang/String;

    .line 32
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_d

    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->g:Ljava/lang/String;

    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v2, v2, Lcom/estrongs/android/ftp/a;->b:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_e

    .line 33
    :cond_d
    iput-boolean v8, v1, Lcom/estrongs/android/ftp/b;->e:Z

    .line 34
    :cond_e
    :goto_7
    iget-boolean v0, v1, Lcom/estrongs/android/ftp/b;->e:Z

    if-eqz v0, :cond_f

    const-string v0, "230 User logged in, proceed.\r\n"

    .line 35
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_8

    .line 36
    :cond_f
    invoke-direct {v1, v13}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_8
    return-void

    .line 37
    :cond_10
    iget-boolean v10, v1, Lcom/estrongs/android/ftp/b;->e:Z

    if-nez v10, :cond_11

    .line 38
    invoke-direct {v1, v13}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_11
    const-string v10, "REST"

    .line 39
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_12

    .line 40
    :try_start_1
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 41
    invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide v2

    iput-wide v2, v1, Lcom/estrongs/android/ftp/b;->l:J

    const-string v0, "350 REST succ.\r\n"

    .line 42
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_9

    :catch_1
    const-wide/16 v2, 0x0

    .line 43
    iput-wide v2, v1, Lcom/estrongs/android/ftp/b;->l:J

    const-string v0, "501 Invalid args.\r\n"

    .line 44
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_9
    return-void

    .line 45
    :cond_12
    invoke-direct {v1, v9}, Lcom/estrongs/android/ftp/b;->e(Ljava/lang/String;)I

    move-result v10

    .line 46
    iget-boolean v13, v1, Lcom/estrongs/android/ftp/b;->o:Z

    if-eqz v13, :cond_14

    if-nez v10, :cond_13

    goto :goto_b

    .line 47
    :cond_13
    :try_start_2
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_a

    :catch_2
    const/4 v0, 0x0

    .line 48
    :goto_a
    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    iput v10, v2, Lcom/estrongs/android/ftp/b$a;->d:I

    .line 49
    invoke-direct {v1, v10, v0}, Lcom/estrongs/android/ftp/b;->a(ILjava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    iput-object v0, v2, Lcom/estrongs/android/ftp/b$a;->e:Ljava/lang/Object;

    .line 50
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    iget-object v0, v0, Lcom/estrongs/android/ftp/b$a;->g:Ljava/util/concurrent/locks/Lock;

    invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V

    const/4 v0, 0x0

    .line 51
    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    const/4 v0, 0x0

    .line 52
    iput-boolean v0, v1, Lcom/estrongs/android/ftp/b;->o:Z

    return-void

    :cond_14
    if-eqz v10, :cond_15

    .line 53
    iget-object v10, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-nez v10, :cond_15

    .line 54
    invoke-direct {v1, v12}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_15
    :goto_b
    const-string v10, "SYST"

    .line 55
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_16

    const-string v0, "215 UNIX Type: L8\r\n"

    .line 56
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_16
    const-string v10, "TYPE"

    .line 57
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_1b

    .line 58
    array-length v0, v6

    const-string v2, "501 Command invalid args.\r\n"

    if-lt v0, v7, :cond_1a

    aget-object v0, v6, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_17

    goto :goto_d

    .line 59
    :cond_17
    aget-object v0, v6, v8

    const-string v3, "I"

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_18

    const-string v0, "200 Type set to I.\r\n"

    .line 60
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_c

    .line 61
    :cond_18
    aget-object v0, v6, v8

    const-string v3, "A"

    invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_19

    const-string v0, "200 Type set to A.\r\n"

    .line 62
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_c

    .line 63
    :cond_19
    invoke-direct {v1, v2}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_c
    return-void

    .line 64
    :cond_1a
    :goto_d
    invoke-direct {v1, v2}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_1b
    const-string v10, "PWD"

    .line 65
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_1c

    .line 66
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "257 \""

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "\" is current directory.\r\n"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_1c
    const-string v10, "CDUP"

    .line 67
    invoke-virtual {v9, v10}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    const-string v12, "250 Directory successfully changed.\r\n"

    const-string v13, "550 Failed to change directory.\r\n"

    if-eqz v10, :cond_21

    .line 68
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    const-string v2, "/"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1d

    .line 69
    invoke-direct {v1, v13}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    .line 70
    :cond_1d
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    const/16 v3, 0x2f

    if-eqz v0, :cond_1e

    .line 71
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v4

    sub-int/2addr v4, v7

    invoke-virtual {v0, v3, v4}, Ljava/lang/String;->lastIndexOf(II)I

    move-result v0

    goto :goto_e

    .line 72
    :cond_1e
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    invoke-virtual {v0, v3}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v0

    :goto_e
    if-gez v0, :cond_1f

    .line 73
    invoke-direct {v1, v13}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_1f
    if-nez v0, :cond_20

    .line 74
    iput-object v2, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    goto :goto_f

    .line 75
    :cond_20
    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    const/4 v3, 0x0

    invoke-virtual {v2, v3, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    .line 76
    :goto_f
    invoke-direct {v1, v12}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_21
    const-string v7, "CWD"

    .line 77
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    const/4 v10, 0x4

    if-eqz v7, :cond_23

    .line 78
    invoke-virtual {v0, v10}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 79
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 80
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 81
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_22

    invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z

    move-result v2

    if-eqz v2, :cond_22

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_22

    .line 82
    invoke-direct {v1, v12}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    .line 83
    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-object v2, v2, Lcom/estrongs/android/ftp/a;->g:Ljava/lang/String;

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->h:Ljava/lang/String;

    goto :goto_10

    .line 84
    :cond_22
    invoke-direct {v1, v13}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_10
    return-void

    :cond_23
    const-string v7, "FEAT"

    .line 85
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_24

    const-string v0, "211-Features\r\nSIZE\r\nPASV\r\n UTF8\r\n211 End\r\n"

    .line 86
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_24
    const-string v7, "LIST"

    .line 87
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_52

    const-string v7, "NLST"

    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_52

    const-string v7, "MLST"

    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_52

    const-string v7, "MLSD"

    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_52

    const-string v7, "RETR"

    .line 88
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_25

    goto/16 :goto_23

    :cond_25
    const-string v7, "PASV"

    .line 89
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    const-string v12, ","

    if-eqz v7, :cond_2d

    .line 90
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-eqz v0, :cond_26

    .line 91
    invoke-virtual {v0}, Lcom/estrongs/android/ftp/b$a;->a()V

    const/4 v0, 0x0

    .line 92
    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    :cond_26
    const/4 v7, 0x0

    const/4 v13, 0x0

    .line 93
    :cond_27
    :try_start_3
    new-instance v0, Ljava/net/ServerSocket;

    iget-object v2, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {v2}, Lcom/estrongs/android/ftp/a;->c()I

    move-result v2

    invoke-direct {v0, v2}, Ljava/net/ServerSocket;-><init>(I)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3

    add-int/lit8 v7, v7, 0x1

    move-object v13, v0

    goto :goto_11

    :catch_3
    nop

    :goto_11
    const/16 v0, 0x14

    if-nez v13, :cond_28

    if-lt v7, v0, :cond_27

    :cond_28
    if-ge v7, v0, :cond_2c

    if-nez v13, :cond_29

    goto :goto_13

    .line 94
    :cond_29
    :try_start_4
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    invoke-virtual {v0}, Lcom/estrongs/android/ftp/a;->d()Ljava/net/InetAddress;

    move-result-object v0
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_4

    .line 95
    invoke-virtual {v13}, Ljava/net/ServerSocket;->getLocalPort()I

    move-result v2

    if-eqz v0, :cond_2b

    if-gtz v2, :cond_2a

    goto :goto_12

    .line 96
    :cond_2a
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "227 Entering Passive Mode ("

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 97
    invoke-virtual {v0}, Ljava/net/InetAddress;->getHostAddress()Ljava/lang/String;

    move-result-object v0

    const/16 v4, 0x2e

    const/16 v5, 0x2c

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 98
    invoke-virtual {v3, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 99
    div-int/lit16 v0, v2, 0x100

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 100
    invoke-virtual {v3, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 101
    rem-int/lit16 v2, v2, 0x100

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v0, ").\r\n"

    .line 102
    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 103
    new-instance v0, Lcom/estrongs/android/ftp/b$a;

    invoke-direct {v0, v1}, Lcom/estrongs/android/ftp/b$a;-><init>(Lcom/estrongs/android/ftp/b;)V

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    .line 104
    iput-object v13, v0, Lcom/estrongs/android/ftp/b$a;->a:Ljava/net/ServerSocket;

    .line 105
    iget-object v0, v0, Lcom/estrongs/android/ftp/b$a;->g:Ljava/util/concurrent/locks/Lock;

    invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->lock()V

    .line 106
    iput-boolean v8, v1, Lcom/estrongs/android/ftp/b;->o:Z

    .line 107
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    .line 108
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_2b
    :goto_12
    const-string v0, "502 get local ip/port failed.\r\n"

    .line 109
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :catch_4
    move-exception v0

    .line 110
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const-string v0, "502 open data port failed.\r\n"

    .line 111
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_2c
    :goto_13
    const-string v0, "502 open data port failed.\r\n"

    .line 112
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_2d
    const-string v7, "NOOP"

    .line 113
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_2e

    const-string v0, "200 NOOP OK.\r\n"

    .line 114
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_2e
    const-string v7, "DELE"

    .line 115
    invoke-virtual {v9, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_33

    .line 116
    :try_start_5
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 117
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 118
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 119
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_32

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_2f

    goto :goto_15

    .line 120
    :cond_2f
    invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_30

    const-string v0, "550 Target is dir.\r\n"

    .line 121
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_5
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_6

    return-void

    .line 122
    :cond_30
    :try_start_6
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v3

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;)Z

    move-result v7
    :try_end_6
    .catch Ljava/lang/SecurityException; {:try_start_6 .. :try_end_6} :catch_5
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_6

    goto :goto_14

    :catch_5
    const/4 v7, 0x0

    :goto_14
    if-eqz v7, :cond_31

    :try_start_7
    const-string v0, "250 DELE command successful.\r\n"

    .line 123
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_16

    .line 124
    :cond_31
    invoke-direct {v1, v4}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_16

    :cond_32
    :goto_15
    const-string v0, "550 File not exist.\r\n"

    .line 125
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_6

    return-void

    .line 126
    :catch_6
    invoke-direct {v1, v4}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_16
    return-void

    :cond_33
    const-string v4, "RMD"

    .line 127
    invoke-virtual {v9, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_38

    .line 128
    :try_start_8
    invoke-virtual {v0, v10}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 129
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 130
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 131
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_37

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_34

    goto :goto_18

    .line 132
    :cond_34
    invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-nez v0, :cond_35

    const-string v0, "550 Target is not a dir.\r\n"

    .line 133
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_8
    .catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_8

    return-void

    .line 134
    :cond_35
    :try_start_9
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v0

    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v4

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4, v2}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/estrongs/fs/f;->a(Lcom/estrongs/fs/g;)Z

    move-result v7
    :try_end_9
    .catch Ljava/lang/SecurityException; {:try_start_9 .. :try_end_9} :catch_7
    .catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_8

    goto :goto_17

    :catch_7
    const/4 v7, 0x0

    :goto_17
    if-eqz v7, :cond_36

    :try_start_a
    const-string v0, "250 RMD command successful.\r\n"

    .line 135
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_19

    .line 136
    :cond_36
    invoke-direct {v1, v3}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_19

    :cond_37
    :goto_18
    const-string v0, "550 Directory not exist.\r\n"

    .line 137
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_8

    return-void

    .line 138
    :catch_8
    invoke-direct {v1, v3}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_19
    return-void

    :cond_38
    const-string v3, "MKD"

    .line 139
    invoke-virtual {v9, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_3c

    .line 140
    :try_start_b
    invoke-virtual {v0, v10}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 141
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 142
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 143
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_3b

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v3
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_b} :catch_a

    if-nez v3, :cond_39

    goto :goto_1b

    .line 144
    :cond_39
    :try_start_c
    invoke-static {}, Lcom/estrongs/fs/f;->d()Lcom/estrongs/fs/f;

    move-result-object v3

    invoke-virtual {v3, v0}, Lcom/estrongs/fs/f;->o(Ljava/lang/String;)Z

    move-result v7
    :try_end_c
    .catch Ljava/lang/SecurityException; {:try_start_c .. :try_end_c} :catch_9
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_c} :catch_a

    goto :goto_1a

    :catch_9
    const/4 v7, 0x0

    :goto_1a
    if-eqz v7, :cond_3a

    :try_start_d
    const-string v0, "257 Directory created.\r\n"

    .line 145
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_1c

    .line 146
    :cond_3a
    invoke-direct {v1, v2}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto :goto_1c

    .line 147
    :cond_3b
    :goto_1b
    invoke-direct {v1, v11}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_d .. :try_end_d} :catch_a

    return-void

    .line 148
    :catch_a
    invoke-direct {v1, v2}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :goto_1c
    return-void

    :cond_3c
    const-string v2, "OPTS"

    .line 149
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_40

    .line 150
    aget-object v0, v6, v8

    if-eqz v0, :cond_3f

    aget-object v0, v6, v8

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-eqz v0, :cond_3f

    aget-object v0, v6, v8

    const-string v2, "UTF8"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_3d

    goto :goto_1e

    .line 151
    :cond_3d
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    const-string v2, "UTF-8"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_3e

    const/4 v2, 0x0

    .line 152
    iput-boolean v2, v1, Lcom/estrongs/android/ftp/b;->q:Z

    const-string v0, "UTF-8"

    .line 153
    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    .line 154
    :try_start_e
    new-instance v0, Ljava/io/BufferedReader;

    new-instance v2, Ljava/io/InputStreamReader;

    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v3}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object v3

    iget-object v4, v1, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    invoke-static {v4}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v4

    invoke-direct {v2, v3, v4}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V

    invoke-direct {v0, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;
    :try_end_e
    .catch Ljava/lang/Exception; {:try_start_e .. :try_end_e} :catch_b

    goto :goto_1d

    :catch_b
    move-exception v0

    .line 155
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_3e
    :goto_1d
    const-string v0, "200 OPTS UTF8 is set to ON.\r\n"

    .line 156
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto/16 :goto_22

    :cond_3f
    :goto_1e
    const-string v0, "550 OPTS wrong args.\r\n"

    .line 157
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    goto/16 :goto_22

    :cond_40
    const/4 v2, 0x0

    const-string v3, "PORT"

    .line 158
    invoke-virtual {v9, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_49

    .line 159
    :try_start_f
    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-eqz v3, :cond_41

    .line 160
    iget-object v3, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v3}, Lcom/estrongs/android/ftp/b$a;->a()V

    const/4 v3, 0x0

    .line 161
    iput-object v3, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    .line 162
    :cond_41
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    const-string v3, "|"

    .line 163
    invoke-virtual {v0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_42

    const-string v3, "::"

    invoke-virtual {v0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_42

    const-string v0, "550 IPV6 addr.\r\n"

    .line 164
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    .line 165
    :cond_42
    invoke-virtual {v0, v12}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    .line 166
    array-length v3, v0

    const/4 v4, 0x6

    if-eq v3, v4, :cond_43

    .line 167
    invoke-direct {v1, v5}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_43
    const/4 v3, 0x0

    .line 168
    :goto_1f
    array-length v4, v0

    if-ge v3, v4, :cond_46

    .line 169
    aget-object v4, v0, v3

    const-string v6, "[0-9]+"

    invoke-virtual {v4, v6}, Ljava/lang/String;->matches(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_45

    aget-object v4, v0, v3

    .line 170
    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v4

    const/4 v6, 0x3

    if-le v4, v6, :cond_44

    goto :goto_20

    :cond_44
    add-int/lit8 v3, v3, 0x1

    goto :goto_1f

    .line 171
    :cond_45
    :goto_20
    invoke-direct {v1, v5}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_46
    new-array v3, v10, [B
    :try_end_f
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_f} :catch_e

    const/4 v7, 0x0

    :goto_21
    if-ge v7, v10, :cond_48

    .line 172
    :try_start_10
    aget-object v2, v0, v7

    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v2

    const/16 v4, 0x80

    if-lt v2, v4, :cond_47

    add-int/lit16 v2, v2, -0x100

    :cond_47
    int-to-byte v2, v2

    .line 173
    aput-byte v2, v3, v7
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_10 .. :try_end_10} :catch_c

    add-int/lit8 v7, v7, 0x1

    goto :goto_21

    .line 174
    :catch_c
    :try_start_11
    invoke-direct {v1, v5}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_11
    .catch Ljava/lang/Exception; {:try_start_11 .. :try_end_11} :catch_e

    return-void

    .line 175
    :cond_48
    :try_start_12
    invoke-static {v3}, Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;

    move-result-object v2
    :try_end_12
    .catch Ljava/net/UnknownHostException; {:try_start_12 .. :try_end_12} :catch_d
    .catch Ljava/lang/Exception; {:try_start_12 .. :try_end_12} :catch_e

    .line 176
    :try_start_13
    aget-object v3, v0, v10

    invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    mul-int/lit16 v3, v3, 0x100

    aget-object v0, v0, v14

    .line 177
    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    add-int/2addr v3, v0

    .line 178
    new-instance v0, Lcom/estrongs/android/ftp/b$a;

    invoke-direct {v0, v1}, Lcom/estrongs/android/ftp/b$a;-><init>(Lcom/estrongs/android/ftp/b;)V

    iput-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    const/4 v4, 0x0

    .line 179
    iput-object v4, v0, Lcom/estrongs/android/ftp/b$a;->a:Ljava/net/ServerSocket;

    .line 180
    iput-object v2, v0, Lcom/estrongs/android/ftp/b$a;->b:Ljava/net/InetAddress;

    .line 181
    iput v3, v0, Lcom/estrongs/android/ftp/b$a;->c:I

    .line 182
    iget-object v0, v0, Lcom/estrongs/android/ftp/b$a;->g:Ljava/util/concurrent/locks/Lock;

    invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->lock()V

    .line 183
    iput-boolean v8, v1, Lcom/estrongs/android/ftp/b;->o:Z

    .line 184
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    const-string v0, "227 Entering Active Mode.\r\n"

    .line 185
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :catch_d
    const-string v0, "550 Unknown host.\r\n"

    .line 186
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V
    :try_end_13
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_13} :catch_e

    return-void

    :catch_e
    move-exception v0

    .line 187
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 188
    invoke-direct {v1, v5}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_49
    const-string v2, "ABOR"

    .line 189
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4b

    .line 190
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->i:Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-nez v0, :cond_4a

    const-string v0, "226 ABOR succ.\r\n"

    .line 191
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    .line 192
    :cond_4a
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->j:Lcom/estrongs/android/ftp/b$a;

    iput-boolean v8, v0, Lcom/estrongs/android/ftp/b$a;->f:Z

    .line 193
    invoke-virtual {v0}, Lcom/estrongs/android/ftp/b$a;->a()V

    :goto_22
    return-void

    :cond_4b
    const-string v2, "SIZE"

    .line 194
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4e

    .line 195
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 196
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 197
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 198
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_4c

    const-string v0, "550 Target not exist.\r\n"

    .line 199
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    .line 200
    :cond_4c
    invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_4d

    const-string v0, "550 Target is a directory.\r\n"

    .line 201
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    .line 202
    :cond_4d
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "213 "

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/io/File;->length()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v2, "\r\n"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_4e
    const-string v2, "QUIT"

    .line 203
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4f

    const-string v0, "221 Byte.\r\n"

    .line 204
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    .line 205
    :try_start_14
    iget-object v0, v1, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->close()V
    :try_end_14
    .catch Ljava/lang/Exception; {:try_start_14 .. :try_end_14} :catch_f

    :catch_f
    return-void

    :cond_4f
    const-string v2, "RNFR"

    .line 206
    invoke-virtual {v9, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_51

    .line 207
    invoke-virtual {v0, v14}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 208
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 209
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 210
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_50

    const-string v0, "550 Target not exist.\r\n"

    .line 211
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void

    :cond_50
    const-string v0, "350 Target exists, ready for destination name.\r\n"

    .line 212
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    .line 213
    iput-boolean v8, v1, Lcom/estrongs/android/ftp/b;->m:Z

    .line 214
    iput-object v2, v1, Lcom/estrongs/android/ftp/b;->n:Ljava/io/File;

    return-void

    :cond_51
    const-string v0, "502 Command not implemented.\r\n"

    .line 215
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    :cond_52
    :goto_23
    return-void

    :cond_53
    :goto_24
    const-string v0, "500 Command unrecognized.\r\n"

    .line 216
    invoke-direct {v1, v0}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    return-void
.end method

.method private e(Ljava/lang/String;)I
    .locals 1

    const-string v0, "LIST"

    .line 1
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    return p1

    :cond_0
    const-string v0, "NLST"

    .line 2
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    const/4 p1, 0x2

    return p1

    :cond_1
    const-string v0, "MLSD"

    .line 3
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    const/4 p1, 0x3

    return p1

    :cond_2
    const-string v0, "MLST"

    .line 4
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    const/4 p1, 0x4

    return p1

    :cond_3
    const-string v0, "RETR"

    .line 5
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_4

    const/4 p1, 0x5

    return p1

    :cond_4
    const-string v0, "STOR"

    .line 6
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    const/4 p1, 0x6

    return p1

    :cond_5
    const-string v0, "APPE"

    .line 7
    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_6

    const/4 p1, 0x7

    return p1

    :cond_6
    const/4 p1, 0x0

    return p1
.end method

.method private f(Ljava/lang/String;)Z
    .locals 4

    const/4 v0, 0x0

    .line 1
    :try_start_0
    invoke-direct {p0, p1}, Lcom/estrongs/android/ftp/b;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/h0;->f()Ljava/util/List;

    move-result-object v1

    .line 3
    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 4
    invoke-static {v2, p1}, Lcom/estrongs/android/util/h0;->d(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_1

    invoke-static {v2, p1}, Lcom/estrongs/android/util/h0;->i(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    if-eqz v2, :cond_0

    :cond_1
    const/4 p1, 0x1

    return p1

    :catch_0
    :cond_2
    return v0
.end method

.method private declared-synchronized g(Ljava/lang/String;)V
    .locals 3

    monitor-enter p0

    .line 1
    :try_start_0
    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Resp:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    invoke-direct {p0, v0, p1}, Lcom/estrongs/android/ftp/b;->a(Ljava/io/BufferedOutputStream;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception p1

    goto :goto_1

    :catch_0
    move-exception p1

    .line 3
    :try_start_1
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 4
    :goto_0
    monitor-exit p0

    return-void

    :goto_1
    monitor-exit p0

    throw p1
.end method


# virtual methods
.method public a(ILjava/io/File;)Ljava/lang/String;
    .locals 8

    .line 8
    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/estrongs/android/ftp/b;->f(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return-object v1

    .line 9
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    .line 10
    invoke-virtual {p2}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_1

    return-object v1

    .line 11
    :cond_1
    invoke-virtual {p2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "*"

    .line 12
    invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_8

    const-string v3, "/"

    .line 13
    invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_2

    goto/16 :goto_4

    :cond_2
    const/4 v1, 0x1

    const-string v3, "\r\n"

    if-ne p1, v1, :cond_6

    .line 14
    invoke-virtual {p2}, Ljava/io/File;->isDirectory()Z

    move-result p1

    if-eqz p1, :cond_3

    const-string p1, "drwxr-xr-x 1 nobody nobody"

    .line 15
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_0

    :cond_3
    const-string p1, "-rw-r--r-- 1 nobody nobody"

    .line 16
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 17
    :goto_0
    invoke-virtual {p2}, Ljava/io/File;->length()J

    move-result-wide v4

    .line 18
    invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Long;->toString()Ljava/lang/String;

    move-result-object p1

    .line 19
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v1

    rsub-int/lit8 v1, v1, 0xd

    :goto_1
    add-int/lit8 v4, v1, -0x1

    if-lez v1, :cond_4

    const/16 v1, 0x20

    .line 20
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move v1, v4

    goto :goto_1

    .line 21
    :cond_4
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 22
    invoke-virtual {p2}, Ljava/io/File;->lastModified()J

    move-result-wide v4

    .line 23
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v6

    sub-long/2addr v6, v4

    const-wide/32 v4, -0x61075000

    cmp-long p1, v6, v4

    if-lez p1, :cond_5

    .line 24
    new-instance p1, Ljava/text/SimpleDateFormat;

    sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;

    const-string v4, " MMM dd HH:mm "

    invoke-direct {p1, v4, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    goto :goto_2

    .line 25
    :cond_5
    new-instance p1, Ljava/text/SimpleDateFormat;

    sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;

    const-string v4, " MMM dd  yyyy "

    invoke-direct {p1, v4, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V

    .line 26
    :goto_2
    new-instance v1, Ljava/util/Date;

    invoke-virtual {p2}, Ljava/io/File;->lastModified()J

    move-result-wide v4

    invoke-direct {v1, v4, v5}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {p1, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 27
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 28
    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto :goto_3

    :cond_6
    const/4 p2, 0x2

    if-ne p1, p2, :cond_7

    .line 29
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 30
    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 31
    :cond_7
    :goto_3
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    return-object p1

    :cond_8
    :goto_4
    return-object v1
.end method

.method public a(Ljava/lang/String;)V
    .locals 0

    .line 7
    iput-object p1, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    return-void
.end method

.method public run()V
    .locals 7

    const/4 v0, 0x0

    .line 1
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    if-nez v1, :cond_0

    .line 2
    new-instance v1, Ljava/io/BufferedOutputStream;

    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v2}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V

    iput-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    .line 3
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    if-nez v1, :cond_1

    .line 4
    new-instance v1, Ljava/io/BufferedReader;

    new-instance v2, Ljava/io/InputStreamReader;

    iget-object v3, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v3}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object v3

    iget-object v4, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    invoke-static {v4}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v4

    invoke-direct {v2, v3, v4}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V

    invoke-direct {v1, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    iput-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    :cond_1
    const-string v1, "220 ESFtpServer 0.1 ready.\r\n"

    .line 5
    invoke-direct {p0, v1}, Lcom/estrongs/android/ftp/b;->g(Ljava/lang/String;)V

    const/4 v1, 0x0

    const/4 v2, 0x0

    :cond_2
    :goto_0
    const/16 v3, 0xa

    if-ge v2, v3, :cond_4

    .line 6
    iget-object v3, p0, Lcom/estrongs/android/ftp/b;->b:Lcom/estrongs/android/ftp/a;

    iget-boolean v3, v3, Lcom/estrongs/android/ftp/a;->e:Z

    if-eqz v3, :cond_4

    .line 7
    iget-object v3, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v3

    if-eqz v3, :cond_3

    .line 8
    invoke-direct {p0, v3}, Lcom/estrongs/android/ftp/b;->d(Ljava/lang/String;)V

    const/4 v2, 0x0

    goto :goto_1

    :cond_3
    add-int/lit8 v2, v2, 0x1

    .line 9
    :goto_1
    iget-boolean v3, p0, Lcom/estrongs/android/ftp/b;->q:Z

    if-eqz v3, :cond_2

    iget-object v3, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    sget-object v4, Lcom/estrongs/android/ftp/a;->v:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 10
    sget-object v3, Lcom/estrongs/android/ftp/a;->v:Ljava/lang/String;

    iput-object v3, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    .line 11
    new-instance v3, Ljava/io/BufferedReader;

    new-instance v4, Ljava/io/InputStreamReader;

    iget-object v5, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v5}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;

    move-result-object v5

    iget-object v6, p0, Lcom/estrongs/android/ftp/b;->p:Ljava/lang/String;

    invoke-static {v6}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v6

    invoke-direct {v4, v5, v6}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V

    invoke-direct {v3, v4}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V

    iput-object v3, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    goto :goto_0

    .line 12
    :cond_4
    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v2, "client exit"

    invoke-virtual {v1, v2}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 13
    :try_start_1
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-eqz v1, :cond_5

    .line 14
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v1}, Lcom/estrongs/android/ftp/b$a;->a()V

    .line 15
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    .line 16
    :cond_5
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    if-eqz v1, :cond_6

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    invoke-virtual {v1}, Ljava/io/BufferedOutputStream;->close()V

    .line 17
    :cond_6
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    if-eqz v1, :cond_7

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V

    .line 18
    :cond_7
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    .line 19
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    .line 20
    :goto_2
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_3

    :catchall_0
    move-exception v1

    goto :goto_4

    :catch_0
    move-exception v1

    .line 21
    :try_start_2
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    .line 22
    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v2, "client exception, exit"

    invoke-virtual {v1, v2}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 23
    :try_start_3
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-eqz v1, :cond_8

    .line 24
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v1}, Lcom/estrongs/android/ftp/b$a;->a()V

    .line 25
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    .line 26
    :cond_8
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    if-eqz v1, :cond_9

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    invoke-virtual {v1}, Ljava/io/BufferedOutputStream;->close()V

    .line 27
    :cond_9
    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    if-eqz v1, :cond_a

    iget-object v1, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V

    .line 28
    :cond_a
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    .line 29
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1

    goto :goto_2

    :catch_1
    :goto_3
    return-void

    .line 30
    :goto_4
    :try_start_4
    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    if-eqz v2, :cond_b

    .line 31
    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    invoke-virtual {v2}, Lcom/estrongs/android/ftp/b$a;->a()V

    .line 32
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->k:Lcom/estrongs/android/ftp/b$a;

    .line 33
    :cond_b
    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    if-eqz v2, :cond_c

    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    invoke-virtual {v2}, Ljava/io/BufferedOutputStream;->close()V

    .line 34
    :cond_c
    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    if-eqz v2, :cond_d

    iget-object v2, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V

    .line 35
    :cond_d
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->c:Ljava/io/BufferedOutputStream;

    .line 36
    iput-object v0, p0, Lcom/estrongs/android/ftp/b;->d:Ljava/io/BufferedReader;

    .line 37
    iget-object v0, p0, Lcom/estrongs/android/ftp/b;->a:Ljava/net/Socket;

    invoke-virtual {v0}, Ljava/net/Socket;->close()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_2

    .line 38
    :catch_2
    goto :goto_6

    :goto_5
    throw v1

    :goto_6
    goto :goto_5
.end method
